package org.ii.ws.upcdatabase;


public class UpcDatabaseXmlRpcClient {
    /**
	public static void main (String[] args) throws Exception {
		String text = "";
		
		//Object[] params = new Object[]{"rpc_key","ed44f748e1d4ef75b06eee6c709cc99bebe1775e", "search", "troika"};
		Object[] params = new Object[]{"rpc_key","ed44f748e1d4ef75b06eee6c709cc99bebe1775e","ean","0012000000850"};
		//Object[] params = new Object[]{"ean","0012000000850"};
        XmlRpcClient client  = new XmlRpcClient( "http://www.upcdatabase.com/xmlrpc", true);
        //XmlRpcStruct result  = (XmlRpcStruct)client.invoke("lookup", new Object[]{"rpc_key", "ed44f748e1d4ef75b06eee6c709cc99bebe1775e", "upc:", "012000000850"});
        XmlRpcStruct result  = (XmlRpcStruct)client.invoke("lookup", params);
        HashMap      results = (HashMap)result;
        if (
            results.size()>0 &&
            results.get("message").toString().equalsIgnoreCase("Database entry found"))
        {
            text = results.get("description").toString()+" "+results.get("size").toString();
        }
    }*/
}
